//
//  MineModel.swift
//  77Club
//
//  Created by Apple on 2024/9/4.
//

import Foundation

struct ClubMineModel: Convertible {

    var user:ClubMineUserModel!
//    var config:ClubMineConfigModel!
//    var quanzi:ClubMineQuanziModel!
//    var mygame:ClubMineMygameModel!
    var nav:[ClubMineNavModel]!
//    var huiyuan:ClubMineHuiYuanModel = ClubMineHuiYuanModel()
//    var shengqianka:ClubMineShengQianKaModel = ClubMineShengQianKaModel()
}

struct ClubMineUserModel: Convertible {
    
    /// 用户名
    var user_name = ""
    /// 颜色
    var color:[String] = []
    /// 头像
    var face = ""
    /// 头像框
    var head_frame = ""
    /// 勋章
    var medal = ""
    /// 会员图片
    var huiyuan_img = ""
    /// 当前VIP等级，如果是0 显示未开通
    var vip = ""
    /// 是否为会员
    var is_huiyuan = false
    /// 代金券数量
    var coupon = ""
    /// 积分
    var point = ""
    /// 预约数量
    var yuyue = ""
    /// 平台币数量
    var coin = ""
    var notice = ""
    ///1已签到  0未签到
    var is_qiandao = false
    var qiandao_day:String = ""
    /// uid
    var vir_user_id = ""
    ///
    var age = ""
    /// "1"：男;"0":女;"":中立
    var gender = ""
    /// 个性签名
    var desc = ""
}

struct ClubMineNavModel: Convertible {
    
    var title = ""
    var data:[ClubMineNavDataModel] = []
}

struct ClubMineNavDataModel: Convertible {

    var name = ""
    var type = ""
    var icon = ""
    var login = ""
    var url = ""
    var gid = ""
}

struct ClubMallListModel: Convertible {
    
    var cat_id = ""
    var goods_id = ""
    var goods_name = ""
    var goods_thumb = ""
    var goods_desc = ""
    var market_price = ""
    var type = ""// 商品类型 0虚拟 1实物
    var number = ""
    var goods_number = ""
    var goods_img = ""
    var sort_order = ""
    var bfb = ""
    var is_shoucang = 0
    var webHeight = 0.0
}


//===========SignIn Model==============
struct ClubSignInModel: Convertible {
    
    var year = ""
    var month = ""
    var my: ClubMySignInModel?
    var list: [ClubMySignDateModel]?
}

struct ClubMySignInModel: Convertible {
    
    var charge_points = ""
    var huiyuan = ""
    var count = ""
    var serial = ""
    var bu_num = "" //补签卡数量
}

struct ClubMySignDateModel: Convertible {
    
    var time = ""
    var time2 = 0
    var t = ""
    var sign = ""
}

struct ClubMyExchangeListModel: Convertible {
    
    var add_time = ""
    var goods_id = ""
    var goods_name = ""
    var goods_num = ""
    var goods_thumb = ""
    var keywords = ""
    var log_sn = ""
    var market_price = ""
    var order_amount = ""
    var order_sn = ""
    var order_status = ""
    var shipping_status = ""
    var status = 0
}

struct ClubCollectGoodsModel: Convertible {
    
    var id = ""
    var goods_id = ""
    var icon = ""
    var name = ""
    var money = ""
}

struct ClubCollectGamesModel: Convertible {
    
    var id = ""
    var name = ""
    var icon = ""
    var point = 0.0
    var image = ""
    var biaoqian = [String]()
    var pay = ""
    var summary = ""
    var login = 0
    var type = ""
    var sort = 0 //排序，自定
    var gid = ""
    var look = ""
    var time = ""
    var pinglun = ""
    var webview_url = ""
    var is_bbs = 0
    var news_uid = "0"
    var news_id = ""
}

struct ClubMyCommitListModel: Convertible {
    
    var cai = ""
    var content = ""
    var game = ""
    var gid = ""
    var icon = ""
    var biaoqian = [String]()
    var id = ""
    var jiajing = ""
    var time = ""
    var zan = ""
    var summary = ""
    var point = 0.0
    var game_point = 0.0
}

struct ClubMineSelfModel: Convertible {
    
    var user_name = ""
    var email = ""
    var pet_name = ""
    var gender = ""
    var face = ""
    var idcard = ""
    var email_verify = 0
    var birthday = ""
}

struct ClubMineAddressModel: Convertible {
    
    var id = ""
    var uid = ""
    var consignee = ""
    var mobile = ""
    var uaddress = ""
    var province = ""
    var city = ""
    var moren = ""
    var bank_user = ""
    var bank_id = ""
}

struct ClubMineSafeModel: Convertible {
    
    var grade = 0
    var dengji = ""
    var phone = ""
    var nav = [ClubMineSafeItemModel]()
}

struct ClubMineSafeItemModel: Convertible {
    
    var status = ""
    var type = ""
}

struct ClubMinePropertyModel: Convertible {
    
    var lb = ""
    var points = ""
    var order = ""
}

struct ClubMineGiftsModel: Convertible {
    
    var card_no = ""
    var cardname = ""
    var create_time = ""
    var end_time = ""
    var game_id = ""
    var gid = ""
    var gname = ""
    var icon = ""
    var id = ""
    var lb_id = ""
    var server_id = ""
    var start_time = ""
    var state = ""
    var status = ""
    var type = ""
    var user_id = ""
    var isShow = false
}

struct ClubMineBlackModel: Convertible {
    
    var id = ""
    var pet_name = ""
    var face = ""
    var black_id_des = ""
}

enum ClubSettingModel: Equatable {
    case none
    case account, normal, privacy, alert, policy, terms, link, service, time, logout
    case update, mode, delAccount, active, chat, integral, open, gift, signin, personal
    case proGift, proIntegral, proGoods
    
    var title: String {
        switch self {
        case .account:
            return "我的账号"
        case .normal:
            return "通用设置"
        case .privacy:
            return "隐私设置"
        case .alert:
            return "消息通知"
        case .policy:
            return "隐私政策"
        case .terms:
            return "用户协议"
        case .link:
            return "官方网站"
        case .service:
            return "联系客服"
        case .time:
            return "工作时间"
        case .logout:
            return "退出登录"
        case .update:
            return "自动检测版本更新"
        case .mode:
            return "省流模式"
        case .delAccount:
            return "账号注销"
        case .active:
            return "接收活动消息"
        case .chat:
            return "聊天消息通知栏提醒"
        case .integral:
            return "接收领积分提醒"
        case .open:
            return "游戏开测提醒"
        case .gift:
            return "礼包上架提醒"
        case .signin:
            return "每日签到提醒"
        case .proGift:
            return "礼包"
        case .proIntegral:
            return "积分"
        case .proGoods:
            return "兑换过的商品"
        case .personal:
            return "个性化推荐"
        default:
            return ""
        }
    }
    
    var icon: String {
        switch self {
        case .account:
            return "Mine_settings_account"
        case .normal:
            return "Mine_settings_normal"
        case .privacy:
            return "Mine_settings_privacy"
        case .alert:
            return "Mine_settings_alert"
        case .policy:
            return "Mine_settings_private"
        case .terms:
            return "Mine_settings_users"
        case .link:
            return "Mine_settings_link"
        case .service:
            return "Mine_settings_service"
        case .time:
            return "Mine_settings_time"
        case .logout:
            return "Mine_settings_logout"
        case .proGift:
            return "Mine_property_gift"
        case .proIntegral:
            return "Mine_property_intel"
        case .proGoods:
            return "Mine_property_goods"
        default:
            return ""
        }
    }
    
    var content: String {
        switch self {
        case .mode:
            return "非WIFI下，不加载图片和视频"
        default:
            return ""
        }
    }
}
